From: | Matt |
Date: | 21 Sep 2001 at 22:00:07 |
Subject: | [amigactive] Re: Floating Point -> Fixed Point conversion |
Hello Shawn
On 21-Sep-01, you wrote:
> Mattster! 'Cooniewaves!
meow :)
>> It's something like
>>
>> #define ToFixed(n) ( ((float)n) * (1<< 16) )
>
> If you mean a 16.16 fixed, that'll work.
Really? Hmmnn.. then I'm flummoxed as to why the variables
come out zero every time :P
> What about just: ((int)(n) << 16)
I need to preserve the fractional part ;)
Thanks
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Secure your servers with 128-bit SSL encryption! Grab your copy of VeriSign's FREE Guide: "Securing Your Web Site for Business." Get it Now!
http://us.click.yahoo.com/4mr93B/zhwCAA/yigFAA/dpFolB/TM
---------------------------------------------------------------------~->
Quote carefully and read all ADMIN:README mails
To unsubscribe mailto:amigactive-unsubscribe@yahoogroups.com
Anyone sending unsubscribe messages to the list will be SHOT!
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/